package com.gxa.weixing.core.pojo;

/**
 * @Author ChenJ
 * @date 2022/01/10 9:37
 **/

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Author ChenJ
 * @date 2022/01/10 9:37
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "tb_product_template_rule")
@ApiModel
public class TemplateRule {

    /**
     * 运费模板编码
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "rule_id")
    @ApiModelProperty(name = "ruleId", value = "运费模板编码", dataType = "Long", example = "1")
    private Long ruleId;

    /**
     * 城市编号
     */
    @Column(name = "city_id")
    @ApiModelProperty(name = "cityId", value = "城市编号", dataType = "String", example = "322")
    private String cityId;

    /**
     * 模板规则首重
     */
    @Column(name = "rule_default_number")
    @ApiModelProperty(name = "defaultNumber", value = "模板规则首重", dataType = "BigDecimal", example = "1")
    private BigDecimal defaultNumber;

    /**
     * 模板规则首重价格
     */
    @Column(name = "rule_default_price")
    @ApiModelProperty(name = "defaultPrice", value = "模板规则首重价格", dataType = "BigDecimal", example = "3")
    private BigDecimal defaultPrice;

    /**
     * 模板规则续重
     */
    @Column(name = "rule_create_number")
    @ApiModelProperty(name = "createNumber", value = "模板规则续重", dataType = "BigDecimal", example = "1")
    private BigDecimal createNumber;

    /**
     * 模板规则续重价格
     */
    @Column(name = "rule_create_price")
    @ApiModelProperty(name = "creatPrice", value = "模板规则续重价格", dataType = "BigDecimal", example = "1")
    private BigDecimal creatPrice;

    /**
     * 模板规则分组名称
     */
    @Column(name = "rule_group_name")
    @ApiModelProperty(name = "groupName", value = "模板规则分组名称", dataType = "String", example = "省内")
    private String groupName;

    /**
     * 模板规则创建时间
     */
    @Column(name = "rule_created")
    @ApiModelProperty(name = "created", value = "模板规则创建时间", dataType = "Date", example = "2022-01-10 10:15:14")
    @JsonFormat(pattern = "YYYY-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date created;

    /**
     * 模板规则修改时间
     */
    @Column(name = "rule_updated")
    @ApiModelProperty(name = "updated", value = "模板规则修改时间", dataType = "Date", example = "2022-01-10 10:15:14")
    @JsonFormat(pattern = "YYYY-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date updated;

}
